home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Utilities / Workspace / Locus / Source / DynamicItemSpec.h < prev    next >
Text File  |  1995-06-12  |  2KB  |  70 lines

  1.  
  2. /*
  3.     Copyright 1993  Jeremy Slade.
  4.  
  5.     You are free to use all or any parts of the Locus project
  6.     however you wish, just give credit where credit is due.
  7.     The author (Jeremy Slade) shall not be held responsible
  8.     for any damages that result out of use or misuse of any
  9.     part of this project.
  10.  
  11. */
  12.  
  13. /*
  14.     Project: Locus
  15.     
  16.     Class: DynamicItemSpec
  17.     
  18.     Description:
  19.     
  20.     DynamicItemSpec is a class used by Group to keep track of the specifications for the DynamicItems to be used by a Group.  The DynamicItemSpec consists of a shell-style file matching expression, such as "*.h", and a regular expression that is generated by translating the shell-style expression -- for the previous example, ".*\.h".  This is done because most users will be more familiar with shell-style matching expressions, but there is no direct support for them, while there is for regular expressions.  When a Group updates its dynamic items, it tells each DynamicItemSpec to find those items matching its expression and add them to the Group.
  21.         
  22.     Original Author: Jeremy Slade
  23.     
  24.     Revision History:
  25.         Created
  26.             V.101    JGS Tue Feb  2 19:11:44 GMT-0700 1993
  27.             
  28. */
  29.  
  30.  
  31. #ifndef DynamicItemSpec_h
  32. #define DynamicItemSpec_h
  33.  
  34. #define DynamicItemSpec_VERSION        (101)
  35.  
  36.  
  37. #import <objc/Object.h>
  38.  
  39.  
  40. @interface DynamicItemSpec : Object
  41. {
  42.     char *expression;    // Shell-style matching expression
  43.     char *regexpr;        // Regular expression
  44.     BOOL enabled;
  45. }
  46.  
  47. // Creating, initializing
  48. + initialize;
  49. - initExpr:(const char *)aString;
  50. - free;
  51.  
  52. // Expression
  53. - setExpression:(const char *)aString;
  54. - (const char *)expression;
  55. - (const char *)regexpression;
  56. - setEnabled:(BOOL)flag;
  57. - (BOOL)enabled;
  58.  
  59. // Scanning for matching items
  60. - addMatchingItemsToGroup:group;
  61.  
  62. // Archiving
  63. - awake;
  64. - read:(NXTypedStream *)stream;
  65. - write:(NXTypedStream *)stream;
  66.  
  67. @end
  68.  
  69. #endif // DynamicItemSpec_h
  70.